feat: Enable trust remote code in CI. - #498
Conversation
859f8c9 to
689fcea
Compare
689fcea to
ae13570
Compare
|
Don't forget to remove the model from the excluded.yaml list when we merge. |
|
st_backend file should also contain the handing of trust_remote_code |
|
tests/spyre/test_e2e_question_answering_compare_spyre.py You do not handle the trust_remote_code in these scripts when you call from_pretrained() |
|
Thanks @BenjSz let me update code and check the other files. |
| def test_auto_loader(model_path): | ||
| auto_spyre_model = sys.modules["hf_adapters.auto_spyre_model"] | ||
| tokenizer = AutoTokenizer.from_pretrained(model_path) | ||
| trust_remote_code = model_path in REMOTE_CODE_PATHS |
There was a problem hiding this comment.
A general comment that applies to all the files.
The trust_remote_code should be a parameter of the methods.
Like that, if someone is running the test with a model_path parameter (without passing via model_registry or via the CI) , it still can passes the parameter trust_remote_code.
Keeping the value of trust_remote_code as dependant of REMOTE_CODE_PATHS makes it dependent of the models defined in model_registry.py and we do not want that.
There was a problem hiding this comment.
A general comment that applies to all the files.
The
trust_remote_codeshould be a parameter of the methods.Like that, if someone is running the test with a model_path parameter (without passing via model_registry or via the CI) , it still can passes the parameter trust_remote_code.
Keeping the value of trust_remote_code as dependant of REMOTE_CODE_PATHS makes it dependent of the models defined in model_registry.py and we do not want that.
@BenjSz I have update the code to have trust_remote_code as a parameter of the test methods and have also added --trust_remote_code over conftest commandline in case users need to use a single such model test.
I am hoping once the clip PR #502 is merged the CI should be green.
688a4d5 to
2945d1c
Compare
2945d1c to
1e9ab2d
Compare
Signed-off-by: Dushyant Behl <myselfdushyantbehl@gmail.com>
Signed-off-by: Dushyant Behl <myselfdushyantbehl@gmail.com>
1e9ab2d to
bad4be7
Compare
Signed-off-by: Dushyant Behl <myselfdushyantbehl@gmail.com>
Fixes #482
Builds on top of #478 and requires #478 to be merged before this PR.